var wb;//读取完成的数据
            var rABS = false; //是否将文件读取为二进制字符串
 
            function importf(obj,arr) {//导入 arr和excel的表头比较
                if(!obj.files) {
                    return;
                }
                var fileName = obj.files[0].name.substr(obj.files[0].name.length-4)
                if(fileName.substr(fileName.length-4).indexOf("xls")==-1){
                	return;
                }
                var f = obj.files[0];
                var reader = new FileReader();
                reader.onload = function(e) {
                    var data = e.target.result;
                    if(rABS) {
                        wb = XLSX.read(btoa(fixdata(data)), {//手动转化
                            type: 'base64'
                        });
                    } else {
                        wb = XLSX.read(data, {
                            type: 'binary'
                        });
                    }
                    //wb.SheetNames[0]是获取Sheets中第一个Sheet的名字
                    //wb.Sheets[Sheet名]获取第一个Sheet的数据
					var wbxlsx = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
					if(wbxlsx[0] == undefined) {
						alert("excel格式不正确!");
						return;
					}
                    var dataEx = JSON.stringify( wbxlsx );
					// 校验excel表头是否正确
					var excelArr = Object.keys(wbxlsx[0]);
					if(!scalarArrayEquals(excelArr, arr)) {
						alert("excel格式不正确!");
						return;
					}
	   	   			if(isCO2 == 0){
                    	parent.setNodeParamData('eXdata',dataEx,nodeId);
                   		parent.setNodeParamData('tableEdited',true,nodeId);
	   	   			} else {
                    	parent.setNodeParamData('eXCO2data',dataEx,nodeId);
                   		parent.setNodeParamData('tableCO2Edited',true,nodeId);
	   	   			}
                    parent.editNodeFlag  = true;
                    initEXTable();
                };
                if(rABS) {
                    reader.readAsArrayBuffer(f);
                } else {
                    reader.readAsBinaryString(f);
                }
            }
 
            function fixdata(data) { //文件流转BinaryString
                var o = "",
                    l = 0,
                    w = 10240;
                for(; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)));
                o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)));
                return o;
            }
			function scalarArrayEquals(array1,array2) {
			  return array1.length==array2.length && array1.every(function(v,i) { return v === array2[i]});
			}
